/*
 * MainFrame.java
 * Copyright (C) 12/30/2005, 18:36 Francisco J. Hernández
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the Free
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 * 
 */

package Sindarin;

/**
 *
 * @author  Francisco J. Hernández
 */
public class MainFrame extends javax.swing.JFrame {
    
    /** Creates new form MainFrame */
    public MainFrame() {
        initComponents();
        //this.setIconImage(Toolkit.getDefaultToolkit().createImage(getClass().getResource("/Sindarin/Imagen/s.png")));
        this.setJMenuBar(mainPanel.menuBar);
        mainPanel.setMainFrame(this);
    }
    
    public MainFrame(String titulo) {
        super(titulo);
        initComponents();
        //this.setIconImage(Toolkit.getDefaultToolkit().createImage(getClass().getResource("/Sindarin/Imagen/s.png").getFile()));
        this.setJMenuBar(mainPanel.menuBar);
        mainPanel.setMainFrame(this);
    }
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
    private void initComponents() {
        mainPanel = new Sindarin.MainPanel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        getContentPane().add(mainPanel, java.awt.BorderLayout.CENTER);

        pack();
    }// </editor-fold>//GEN-END:initComponents
    
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new MainFrame().setVisible(true);
            }
        });
    }
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private Sindarin.MainPanel mainPanel;
    // End of variables declaration//GEN-END:variables
    
}
